package com.cloud.school.bus.teacherhelper.protocol.classmanage;

import java.util.HashMap;

import android.content.Context;
import android.text.TextUtils;

import com.cloud.school.bus.teacherhelper.protocol.ProtocolDef;
import com.cloud.school.bus.teacherhelper.protocol.baserequest.BasePostHttpRequest;
/**
 * 增加家长手机号和学生关联
 * @author jiahongfei
 *
 */
public class RelationShipRequest extends BasePostHttpRequest {

	/**
	 * 
	 * @param context
	 * @param parentid 家长id
	 * @param name 学生姓名
	 * @param tel 手机号
	 * @param sex 学生性别1为男 2为女
	 * @param birthday 学生生日
	 * @param fbody 学生头像base64编码
	 * @param fext 默认 jpg
	 * @param fsize 文件大小默认0
	 */
	public RelationShipRequest(Context context, String parentid, String name, String tel, String sex, 
			String birthday, String fbody, String fext, String fsize) {
		super(context);
		HashMap<String, String> requestMap = new HashMap<String, String>();
		if(!TextUtils.isEmpty(parentid)){
			requestMap.put("parentid", parentid);
		}
		if(!TextUtils.isEmpty(name)){
			requestMap.put("name", name);
		}
		if(!TextUtils.isEmpty(tel)){
			requestMap.put("tel", tel);
		}
		if(!TextUtils.isEmpty(sex)){
			requestMap.put("sex", sex);
		}
		if(!TextUtils.isEmpty(birthday)){
			requestMap.put("birthday", birthday);
		}
		if(!TextUtils.isEmpty(fbody)){
			requestMap.put("fbody", fbody);
		}
		if(!TextUtils.isEmpty(fext)){
			requestMap.put("fext", fext);
		}
		if(!TextUtils.isEmpty(fsize)){
			requestMap.put("fsize", fsize);
		}
		setRequestParam(ProtocolDef.METHOD_Relation_Ship, requestMap);
	}

}
